<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .list{
            width: 300px;
            list-style: none;
            padding: 0px;
            margin: 50px auto;
        }
        .list li{
            line-height: 50px;
            border-bottom: 1px dotted black;
        }
    </style>
    <script>
        window.onload = function () {
            var aList = ['碟中谍1', '碟中谍2', '碟中谍3', '碟中谍4', '碟中谍5', '碟中谍6'];
            var sTr = '';

            var oUl = document.getElementById('list');

            for (var i = 0; i < aList.length; i++) {
                sTr += '<li>' + aList[i] + '</li>';

            }
            // alert(sTr);

            oUl.innerHTML = sTr;
        }
    </script>
</head>
<body>
    <ul class="list" id="list">
        <li>列表文字</li>
        <li>列表文字</li>
        <li>列表文字</li>
        <li>列表文字</li>
        <li>列表文字</li>
        <li>列表文字</li>
    </ul>
</body>
</html>